package week13;

import java.util.ArrayList;
import java.util.Random;

public class Member extends Person{
    public Member() {
    }

    public Member(String name, int money) {
        super(name, money);
    }
    public void receiveMoney(ArrayList<Integer>radList){
        int index=new Random().nextInt(radList.size());
        Integer remove=radList.remove(index);
        int money=super.getMoney();
        super.setMoney(money+remove);
    }
}
